package com.brillilab.domain.enums.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author wuzhiyu
 * @Title: BoolEnum
 * @ProjectName brill_lab
 * @Description: TODO
 * @date 2019/2/229:47
 */
@Getter
@AllArgsConstructor
public enum BoolEnum {
    FALSE(0, "False"), TRUE(1, "True");
    private Integer value;
    private String name;
    
    public static BoolEnum getEnum(Integer value) {
    	if(value!=null) {
    		for (BoolEnum e : BoolEnum.values()) {
    			if (e.getValue().equals(value)) {
    				return e;
    			}
    		}
    	}
        return null;
    }
}
